<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回服务器版本信息</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.oci-rollback.html">« oci_rollback</a></li>
      <li style="float: right;"><a href="function.oci-set-action.html">oci_set_action »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.oci8.html">OCI8 函数</a></li>
    <li>返回服务器版本信息</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.oci-server-version" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">oci_server_version</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8, PECL OCI8 &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">oci_server_version</span> &mdash; <span class="dc-title">返回服务器版本信息</span></p>

 </div>
 <div class="refsect1 unknown-seealsp" id="refsect1-function.oci-server-version-unknown-seealsp">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>oci_server_version</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection</code></span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   以字符串返回 <code class="parameter">connection</code> 所连接的 Oracle
   服务器的版本信息。出错则返回 <strong><code>false</code></strong>。
  </p>
  <p class="para">
   <div class="example" id="example-1872">
    <p><strong>示例 #1 <span class="function"><strong>oci_server_version()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;$conn&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">oci_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"scott"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"tiger"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Server&nbsp;Version:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">oci_server_version</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">oci_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    在 PHP 5.0.0 之前的版本必须使用 <span class="function"><a href="function.ociserverversion.html" class="function">ociserverversion()</a></span>
    替代本函数。该函数名仍然可用，为向下兼容作为
    <span class="function"><strong>oci_server_version()</strong></span> 的别名。不过其已被废弃，不推荐使用。
   </p>
  </p></blockquote>
 </div>

</div></div></div></body></html>